Skip to content

wpfacts: move the promise and iteration protocol helpers out of gen_expr.rs (pure move, file size cap) - #14525

Merged
proggeramlug merged 3 commits into
mainfrom
chore/gen-expr-protocol-split
Nov 12, 2026
Merged

proggeramlug merged 3 commits into
mainfrom
chore/gen-expr-protocol-split

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

What

scripts/check_file_size.sh fails on main for crates/perry-wpfacts/src/gen_expr.rs: 2011 code lines against the cap of 2000, and the file is not in the allowlist. This PR does what the script asks: a small topical split, not an allowlist entry.

Pure move of one function group, the promise and iteration protocol helpers of impl Gen, into the new sibling module gen_protocol.rs:

  • awaited, resolver_fn, async_body, promise_of (await / promise adoption / untransformed async body)
  • iterate, iterator_of (for-of and GetIterator)

The six methods stay pub(crate) methods of Gen with unchanged bodies, comments and formatting; callers need no change and nothing is re-exported (they are inherent methods, not free items). lib.rs gains mod gen_protocol;. diff of the removed lines against the added body is empty.

gen_expr.rs: 2011 -> 1932 code lines; gen_protocol.rs: 83.

The group was chosen because it was last edited on 2026-11-09 (three lines) and otherwise in October; the keyed-store / putvalue / IndexSet emission that open lanes are editing is not touched.

Switch: none (no behaviour change).

Checks

  • cargo check -p perry-wpfacts --lib --tests after merging main b40d812: clean, no warnings.
  • rustfmt --check on the new file: clean.
  • perry-wpfacts lib tests and chess facts dump before/after: see the comment below once the qb10 run is in.
  • Long gates (IR census, vf, tssrc, Supabase, skin size, full suites): not run.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@proggeramlug
proggeramlug merged commit 3cd7ef9 into main Nov 12, 2026
87 checks passed
@proggeramlug
proggeramlug deleted the chore/gen-expr-protocol-split branch November 12, 2026 05:39
@proggeramlug

Copy link
Copy Markdown
Contributor Author

qb10, on main 3cd7ef9 + #14526's branch (which contains this PR): cargo test --release -p perry-wpfacts --lib -- async await promise iterat for_of generator 123 passed, 0 failed. Facts dump before/after: pure move, not rebuilt before the move.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant